#ifndef TEXTURE_H
#define TEXTURE_H
#include "stdio.h"
#include "TextureFileHeader.h"


enum TextureFormat
{
	TEXTURE_FORMAT_UNKNOWN,
	TEXTURE_FORMAT_R8G8B8,
	TEXTURE_FORMAT_R8G8B8A8,
	TEXTURE_FORMAT_ATC,
	TEXTURE_FORMAT_PVR,
	TEXTURE_FORMAT_DXT,
	TEXTURE_FORMAT_ETC,
};
class Texture
{
public:
	TextureFormat format;
	int width, height;
	int mipmapCount;
	unsigned int idGL;
	char *data;
	void LoadFromFile(FILE* file);
private:
	bool ReadPVRV2Header(char** pointer);
	bool ReadPVRV3Header(char** pointer);
	bool ReadDDSHeader(char** pointer);
	bool ReadKTXHeader(char** pointer);
	bool ReadTGAHeader(char** pointer);
	void LoadETC(char** pointer);
	void DecompressETC(char** pointer);
	void LoadTGA(char** pointer);
};
#endif